package com.example.admin_oa.model.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.comment_oa.pojos.SysPermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author cjl
* @description 针对表【sys_permission】的数据库操作Mapper
* @createDate 2022-10-15 00:45:00
* @Entity com.example.admin_oa.model.pojo.SysPermission
*/
@Mapper
public interface SysPermissionMapper extends BaseMapper<SysPermission> {
    //获取主菜单
    List<SysPermission> meuList(@Param("userId") int userId);
    //根据主菜单id查询子菜单
    List<SysPermission> menuSub(@Param("sysPermissionId") int sysPermissionId,@Param("userId")int userId);
    //
    List<SysPermission> meneListAll();
    List<SysPermission> meneYes();
    List<SysPermission> menuSubAll(@Param("sysPermissionId")int sysPermissionId);
    //获取主菜单
    List<SysPermission> menuListByRoleId(@Param("roleId")int roleId);
    //获取子菜单
    List<SysPermission> menuSubRole(@Param("roleId")int roleId,@Param("sysPermissionId")int sysPermissionlId);
}




